#pragma once

#ifndef _CGUILDSHOPHANDLER_H_
#define _CGUILDSHOPHANDLER_H_

#include "Utils/T2List.h"

class CGuildShop;

class CGuildShopHandler {

public:

	// Checks that guild shop list isnt NULL
	static void checkGuildShopList();

	// Get/Set functions for guild shop list
	static CGuildShop* getGuildShop(unsigned short guildID);
	static void addGuildShop(CGuildShop * guildShop);

	// Initialize Guild Shops
	static void initialize();

	// Adds quantity to guild shops once a vana day
	static void UpdateGuildShops();

	static unsigned char removeItemQuantity(unsigned short guildID, unsigned short itemID, unsigned char quantity);
	static unsigned char addItemQuantity(unsigned short guildID, unsigned short itemID, unsigned char quantity);
	static unsigned char getItemQuantity(unsigned short guildID, unsigned short itemID);

	static unsigned long getItemPrice(unsigned short guildID, unsigned short itemID);
	static unsigned long getItemSellPrice(unsigned short guildID, unsigned short itemID);

	// Semaphore functions
	static void waitGuildShopList();
	static void exitGuildShopList();

private:
	static T2List<unsigned short,CGuildShop*>* m_guildShopList;

};

#endif